package com.sos.application
{
	
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	public class FlashApplicationEvent extends Event
	{
		
		// -------------------------------------------------------------------------------
		// CONSTANTS
		// -------------------------------------------------------------------------------
		
		// Events
		public static const         EVENT_START:String						= "flashApplicationStart";
		public static const         EVENT_INIT_BEGIN:String					= "flashApplicationInitBegin";
		public static const         EVENT_INIT_STEP_BEGIN:String			= "flashApplicationInitStepBegin";
		public static const         EVENT_INIT_STEP_END:String				= "flashApplicationInitStepEnd";
		public static const         EVENT_INIT_END:String					= "flashApplicationInitEnd";
		public static const         EVENT_LOGIN:String						= "flashApplicationLogin";
		public static const         EVENT_LOGIN_FAILED:String				= "flashApplicationLoginFailed";
		public static const         EVENT_LOGOUT:String						= "flashApplicationLogout";
		public static const         EVENT_ERROR:String						= "flashApplicationError";
		
		
		// -------------------------------------------------------------------------------
		// FIELDS
		// -------------------------------------------------------------------------------
		
		private var _message:String;
		
		// -------------------------------------------------------------------------------
		// CONSTRUCTOR
		// -------------------------------------------------------------------------------
		
		/**
		 * Create a generic SoS_Application event
		 * @param t Event type name
		 * @param c SoS_ApplicationEvent reference
		 */		
		public function FlashApplicationEvent(type:String, message:String = "")
		{
			super(type);
			// Init
			_message = message;
		}
		
		// -------------------------------------------------------------------------------
		// PROPERTIES
		// -------------------------------------------------------------------------------

		public function get message():String
		{
			return _message;
		}

		
	}
}